<template>
  <div>Detail{{ type }}</div>
</template>

<script lang="ts">
 import { type } from 'os';
import { computed, defineComponent } from 'vue'
  export default  defineComponent({
    name:'Detail'
  })
</script>
<script lang="ts" setup>
  import {useRoute} from 'vue-router'
  //useRoute
  //返回当前路由地址。相当于在模板中使用￥route
  //必须在setup中使用，只要动态路由参数发生改变，route对象就会随之改变
  const route=useRoute()
  //动态获取动态路由参数
  const type=computed(()=>{
    return route.params.type
  })
</script>

<style lang="less" scoped>
  
</style>